Copyright: (c) Daniel Doubrovkine - Stolen Technologies Inc. - University of Geneva - 1996
Citation: (c) Daniel Doubrovkine - Stolen Technologies Inc. - University of Geneva - 1996


About the Expression Calculator

Expression Calculator is a powerful mathematical expressions evaluator. It is full 32 bit object oriented and is designed for Windows NT and Windows 95.

Expression Calculator 2.0 has been developped with (c) Borland Delphi 2.0 under Windows NT (TM).

Disclaimer: This software is NOT free. Any person, company or organisation using the Expression Calculator should buy it from the author himself or from an authorized dealer. You may not modify, sell or abuse of this software without a total unforced consent of the author. You are encouraged by all means to distribute this software. Though the Expression Calculator  has been diligently tested to provide absolutely correct results in the domain of possible, the author will still not be responsible for eventual errors caused directly or indirectly by the Expression Calculator itself, any kind of misuse, bugs in processors (looks familiar) or any external influence by any kind of life or artificial intelligence form. The author of this software will not be held responsible for any kind of data, job or time loss, as well as personal dramas, collective chaos, space shuttle explosions, etc... All names of companies are registered trademarks of their respective owners. Any illegal sale or use of  the Expression Calculator will be severely punished and any violation of this agreement will be prosecuted to the maximum extent possible under the Swiss criminal law.

please check the complete license agreement

The Expression Calculator has not been ripped from anywhere, all meterial used has been listed below. The Expression Calculator includes uninherited TreeView32 (v.1.2) & MathCalc32 (v.2.2) ( TThread ) multithread objects (c)  Daniel Doubrovkine (1996). Expression Calcualtor calculates a huge number of mathematical expressions with a satisfactory precision of between 10 and 20 decimals. Expression Calculator uses rather advanced numerical methods, but it is not made to concurrence symbolic analysis software like WaterLoo (R) Maple or Wolfram (R) Mathematica. Expression Calculator has a true multithread capability due to it's rigourous object oriented style and it's powerfull calculation thread generator. This means you can calculate as many expressions as you like at the same time and launch any other calculation before a previous task is finished.

(The Expression Calculator is dedicated to the genious of a swiss guy, Leonhard Euler)

There are currently four places where you can always find the latest version of the Expression Calculator  and download it for a free trial:

 my main site in Switzerland at Infomaniak Computer Megastore: http://www.infomaniak.ch/~dblock

University of Geneva little mirror: http://cuiwww.unige.ch/~doubrov5

Tulane University in New Orleans, USA: http://studentweb.tulane.edu/~gcyoung/dans/software.htm

LionHeart Productions in Salt Lake City, Utah, USA: http://www.lionheart.net/dblock

For bugs, problems, money, decent and serious proposals, please contact (best by e-mail):

Daniel Doubrovkine

11, chemin de la Clairière

1207 Geneva

Switzerland

tél & fax: 41 (0) 22 735 69 47

e-mail: dblock@infomaniak.ch / doubrov5@cui.unige.ch

Any kind of notes or support welcome!

The source of the multithread calculation object written in object pascal (Delphi 2.0) is available on the Expression Calculator's home page at http://www.infomaniak.ch/~dblock/express.htm. This source may be used freely for non lucrative purposes. For using it in shareware or small commercial software, please register it for US$ 50.-.

For using it in large software projects, please contact the author. The price of the complete Expression Calculator source is US$ 100.- and is available on demand.

Of course you may download lot's of things and the source for free, but besides the appeal of your conscience, you should remember that Big Brother's watching you:)

books and material used for writing this cool calculator:

N. Wirth (Federal Politechnic Institute of Zürich...the guy who has written the bases of modern Pascal) - "Algorithms+Data Structures=Programs"

R. Sedgewick (University of Princeton) - "Algorithms in C language"

Bjarne Stroustrup (AT&T Bell Laboratories) - "The C++ Programming Language" (second edition)

E.Hairer - G. Wanner (University of Geneva) - "Analysis by it's History" (gee, my math course, really excellent book...)

My Algebra course mostly by Mr. Haussmann (University of Geneva)

Erns Hairer (University of Geneva) - "Analyse Numérique" (second edition) - 1993

M. Abramowitz and I. Stegun, ``Handbook of Mathematical Functions.'' Dover Publications Inc., New York, 1965

A. Erdelyi, Higher Transcendental Functions, McGraw-Hill, 1953

There's also some code from the S.W.A.G Pascal support team, which is doing a really great job.


Expression Calculator User's Guide

The general idea of the Expression Calculator is that you can write any valid mathematical expression and the program will calculate it for you. You must distinguish several parts of the Expression Calculator:

- parameters

when launching the Expression Calculator you can specify parameters at the command line:

small	:	initialize the Expression Calculator small

medium	:	initialize the Expression Calculator medium

scientific	:	initialize the Expression Calculator scientific

notitle	:	do not show the initialization bitmap

any other parameter will be ignored and the Expression Calculator will be initialized in the last mode it was started

- the Result Grid

The Result Grid provides a history for calculation. Clicking with the left button of the mouse on a cell will copy it's operational command to the input box for reevaluation. In order to insure maximum precision, the result is not taken, but will be reconsidered entirely. You can copy the corresponding result to the clipboard by clicking on the first column (containing the line numbers) with the left mouse button. Clicking with the right button on a running task will pop a menu that allows to abort, suspend and resume a task or all tasks or satisfy currently calculated integral tolerance. This menu contains functions for clearing the primes table as well as copying those primes and results to the clipboard. You may also reset the Expression Calculator, which is equivalent to pressing the AC button. You may save and load the current state of the Expression Calculator, including current variables.The size of this grid is virtually infinite. Loading will merge variables from the saved container with the actual ones.

- the Input Box

The Input Box is used to enter an expression. You max enter any natural expressions the Expression Calculator understands. Check the repository for the complete list. The Expression Calculator is of  course parenthesis and mathematical order aware. Try entering 2+2 and pressing enter, the result should be somewhere around 4:)

- the Result Panel

The Result Panel shows the latest result of an operation. It contains a rounded to two decimals result as well almost untruncated value. It also contains indicators for the calculation modes, Radient and Degree for the moment. The Result Panel has two arrows to wrap and unwrap the Expression Calculator from a scientific to a less scientific view.

- the Modes Panel

The Modes Panel allows to know at any moment the number of tasks running as well as to switch between the RADient and the DEGree mode. The Mode Panel contains a button (right arrow) for rarely used but useful and powerful functions. By switching between the DEG/RAD (decimal modes), HEXadecimal, BINary and OCTal mode results and valid input will change consequently.

- the Functions' Panel

Divided in two parts, the Functions Panel contains operational flags for inverse, hyperbolic and negative functions:

ARC: inverse functions flag (SIN becomes ARCSIN)

HYP: hyperbolic functions flag (SIN becomes SINH, with the ARC enabled, SIN becomes ARCSINH)

NOT: inverse logical operations, XOR becomes XNOR, etc.

ABOUT: shows the about Expression Calculator Window

By pressing any other function button, the corresponding operation will be inserted at the cursor position of the Input Box. Check the repository for the complete list of functions.

- the Operations' Panel

Same as Functions Panel, this later contains the simple operations you may want to perform, as well as the variable support:

STO: store a single character variable (prompts a window with available variables)

RCL: restore a single character variable (prompts a window with available variables)

ANS: the last calculated expression

EXP: *10^expression

OFF: quit the expression calculator (you will be prompted if tasks running)

AC: clear all operations (you will be prompted if tasks running)

C: clear the current input

DEL: delete the actual input character

You can also resize the Expression Calculator. Shape will be kept using the registry and will be user private.


Mathematical Repository

This repository contains all the functions the Expression Calculator can perform with their mathematical description.

Constants:

Pi

E (Euler's number)

G (Euler's contant)

Catalan

- Operators:

+ (plus)

- (minus)

* (product)

/ (division)

% (percentage)

¦ (integer division)

^ (power)

! (factor)

\ (root)

e

m (modulo)

= (assignment)

- Logical Operators:

and

nand

nor

not

or

shl

shr

xnor

xor

- General Functions:

abs

average

ceil

floor

frac

gcd (greatest common divisor)

intg

lcm (least common multiple)

ln / log

logten

logn

max

min

mul

random

round

sum

sqr

sqrt

trunc

- Trigonometric and Hyperbolic:

arccos

arccosh

arccot

arccoth

arccsc

arccsch

arcsec

arcsech

arcsin

arcsinh

arctan

arctanh

cos

cosh

cot

coth

csc

csch

exp

sec

sech

sin

sinh

tan

tanh

Special Functions and Series:

beta

binom

fib (fibonacci)

fermat

gamma (Euler's Gamma)

harmonic

pochhammer

sigma

tau

   Primes & Numbers:

genmers

mersienne

mersiennegen

mersgen

perfect

phi (eInd)

prime

primec

primen

Integrals:

- approximations (student)

trapezoid

simpson

newton

boole

ordersix

weddle

- exact (Gauss):

Int

dilog

Erf - the Error Function

Erfc - the Complementary Error Function and its Iterated Integrals

- trigonometric

Si - the Sine Integral

Ci - the Cosine Integral

Ssi - the Shifted Sine Integral

Shi - the Hyperbolic Sine Integral

Chi - the Hyperbolic Cosine Integral

- Fresnel

Fresnel

FresnelC - the Fresnel Cosine Integral

FresnelS - the Fresnel Sine Integral

Fresnelf, Fresnelg - the Fresnel Auxiliary Functions

- elliptic

EllipticE - Incomplete and complete elliptic integrals of the second kind

EllipticCE - Complementary complete elliptic integral of the second kind

EllipticF - Incomplete elliptic integral of the first kind

EllipticK - Complete elliptic integral of the first kind

EllipticCK - Complementary complete elliptic integral of the first kind


plus
+

description:	simple addition

syntax:	x + y

domain:	+ : (R x R) -> R

example:	2 + 2 = 4


minus
-

description:	simple substraction

syntax:	x - y

domain:	- : (R x R) -> R

example:	2 - 8 = -6


product
*

description:	simple product

syntax:	x * y

domain:	* : (R x R) -> R

example:	2 * 2 = 4


division
/

description:	simple division

syntax:	x / y

domain:	/ : (R x R*) -> R*

example:	2 / -2 = -1


modula
m

description:	modulo division

syntax:	x m y | x,y legal expressions, y <> 0

domain:	m: (R x R) -> Z

example:	4 m 2 = 0

notes:	errors will occur if combined to a variable like pm2 will be understood as a function and an error reported, you should put p in parenthesis to avoid this error, example: (p)m2=0 if p=4. Non integer values are truncated before the modula division.


percentage
%

description:	left percentage of right expression

syntax:	x % y

domain:	% : (R x R) -> Z

example:	4%2=0.08

notes:	percentage  is calculated sign independent, then multiplied by both signs.


integer division
¦

description:	integer division

syntax:	x ¦ y

domain:	¦ : (R x R*) -> R

example:	4.1¦ 2 = 2

notes:	first makes the division, then truncates the value


power
^

description:	power, elevates a number into a power

syntax:	x ^ y

domain:	^ : (R x R) -> R

example:	4 ^ 3 = 64


factor
!

description:	factor

syntax:	x !

domain:	! : R \ { Z- } -> R

example:	- 2.1! = 9.71

notes:	uses Euler's Gamma function method for huge or non integer positive or negative numbers:

Step of 0.01 is used for the integral and infinity replaced by 100 which is definetely more than enough.

0! = 1 by definition

plot of the Factorial:


root
\

description:	root

syntax:	x \ y

domain:	\ : R* -> R

and a pair root cannot be calculated for a negative number

example:	3 \ 8 = 2

notes:	x \ y = y^(1 / x)


xor

description:	bitwise xor

syntax:	x xor y

domain:	xor: (Z (trunc(R)) x Z (trunc(R))) -> Z

example:	2 xor 4 = 6

notes:	if the values of expressions for x and y are not integer, they are truncated

each bit is xored:

0	0	0

0	1	1

1	0	1

1	1	0


xnor

description:	bitwise xnor

syntax:	x xnor y

domain:	xnor: (Z (trunc(R)) x Z (trunc(R))) -> Z

example:	2 xnor 4 = -8

notes:	if the values of expressions for x and y are not integer, they are truncated

each bit is xnored:

0	0	1

0	1	0

1	0	0

1	1	1


and

description:	bitwise and

syntax:	x and y

x & y

domain:	and: (Z (trunc(R)) x Z (trunc(R))) -> Z

example:	3 and 9 = 1

notes:	if the values of expressions for x and y are not integer, they are truncated

each bit is anded:

0	0	0

0	1	0

1	0	0

1	1	1


nand

description:	nand

syntax:	x nand y

domain:	nand: Z (trunc(R)) x Z (trunc(R))) -> Z

example:	3 nand 9 = 1

notes:	if the values of expressions for x and y are not integer, they are truncated

each bit is nanded:

0	0	1

0	1	1

1	0	1

1	1	0


or

description:	or

syntax:	x or y

domain:	or: (Z (trunc(R)) x Z (trunc(R))) -> Z

example:	2 or 4 = 6

notes:	if the values of expressions for x and y are not integer, they are truncated

each bit is ored:

0	0	0

0	1	1

1	0	1

1	1	1


nor

description:	nor

syntax:	x nor y

domain:	nor: (Z (trunc(R)) x Z (trunc(R))) -> Z

example:	2 nor 4 = -7

notes:	if the values of expressions for x and y are not integer, they are truncated

each bit is nored:

0	0	1

0	1	0

1	0	0

1	1	0


Not

description:	bitwise Not

syntax:	Not ( x )

domain:	Not: Z (trunc(R)) -> Z

example:	Not ( 1 ) = 2

notes:	if the values of expressions for x and y are not integer, they are truncated

each bit is inversed:

0	1

1	0


Lcm

description:	Least Common Multiple between up to as many arguments as wanted

syntax:	Lcm (x , ... , y)

domain:	Lcm: (Z x Z) -> Z

example:	Lcm (14,4) =28

notes:	Lcm (x,y):=(u div gcd(u,v))*v)

ppcm does the same thing and stands for "le Plus Petit Commun Multiple"


Gcd

description:	Greatest Common Divisor between up to as many arguments as wanted

syntax:	Gcd (x , ... , y)

domain:	Gcd: (Z x Z) -> Z

example:	Gcd (3213,24) =3

notes:	there's a very simple algorithm to find the greatest common divisor between two integers:

  t: of x,y type;

while x <> 0) do begin

t::=x-trunc(x/y)*y;	{t::=x mod y}

x:=y;

y:=t;

end;

gcd := x;

pgcd does the same thing and stands for "le Plus Grand Commun Diviseur"


fibonacci
Fib

description:	Fibonacci integers

syntax:	Fib(x)

domain:	Fib : N -> N

example:	Fib ( 56 ) = 2.258e11

notes:	Fibonacci is defined this way:

Fib (x < 2) := x

Fib (x) := Fib(x-1) + Fib(x-2)

The current function uses a super fast iterative matrix method and is able to calculate Fibonacci numbers up to fib(2^14).


Gamma

description:	Euler's Gamma function (or simply Euler's function)

syntax:	Gamma (x, step)

domain:	Gamma : (R \ {integer negative numbers} x R) -> R

example:	Gamma (0.5) = Sqrt (pi) = 1.77

notes:

The function has been extended by Euler to negative values with the help of

note that for negative values this is just a definition and the integral has here absolutely no sense

By the way, Gamma (1/5) = Sqrt(Pi) (which is calculated with the Gaussian integral, which is beyond the scope of this help file). Thus, this function diverges for integer negative values.

Check the factorial and Euler's beta functions for a concrete use of the gamma function.


shl

description:	bitwise shift left

syntax:	Shl (x , y)

domain:	Shl : (Z x Z) -> Z

example:	Shl (2,1) = 4

notes:	shifts the values of x left of y positions, same as multiplying by 2^y


shr

description:	bitwise shift right

syntax:	Shr (x , y)

domain:	Shr : (Z x Z) -> Z

example:	Shr (2,1) = 1

notes:	shifts the values of x right of y positions, same as dividing by 2^y


Min

description:	chooses the smallest value between up to as many arguments as wanted

syntax:	Min (x , ... , y)

domain:	Min : (R x R) -> R

example:	Min (1,2) = 1


Max

description:	chooses the biggest value between up to as many arguments as wanted

syntax:	Max (x , ... , y)

domain:	Max : (R x R) -> R

example:	Max (1,2,234) = 234


eInd
Phi

Ind

description:	Euler's indicator (Totient Function)

syntax:	Phi ( x ) or eInd ( x )

domain:	Phi : Z -> N

example:	Phi ( 12 ) = 4

notes:	Euler's indicator is the number of prime numbers to the integer argument. Phi ( x ) = Phi ( -x ). Phi(1) = 1.

Phi(x): Zm -> Z1*Z2...Zm is a isomorphism, meaning that the decomposition of any number into a product of prime numbers is unique. Euler has demonstrated this theoreme and added that Phi ( x ) = x * (1-1/p1)*...*(1-1/pn), where p1...pn are prime number from the decomposition of x, taken once. Thus 12=2^2*3 and Phi (12) = 12 * (1-1/2) * (1-1/3) which is always an integer value and is equal to 4. Thus, there are 4 primes inferiour and to 12.


Frac

description:	fractionary part of a number

syntax:	Frac ( x )

domain:	Frac : R -> Z

example:	Frac (1.345) = 0.35

notes:	Frac ( x ) = x - Trunc ( x )


Abs

description:	absolute value of a number

syntax:	Abs ( x )

domain:	Abs : R -> R

example:	Abs ( -2 ) = 2


Intg

description:	integer part of the number

syntax:	Intg ( x )

domain:	Intg : R -> Z

example:	Intg (2.1) = 2


Round

description:	rounds a number to the closest integer

syntax:	Round ( x )

domain:	Round : R -> Z

example:	Round (-2.1) = -2


Trunc

description:	truncates the number to an integer

syntax:	Trunc ( x )

domain:	Trunc : R -> Z

example:	Trunc (2.1) = 2


log
Logten

description:	10 based logarithm of it's argument

syntax:	Logten ( x )

domain:	Logten : R+ -> R

example:	Logten (10^45) = 45


Logn

description:	calculates any based logarithm

syntax:	Logn (base, x)

domain:	Logn : (R+, R+) -> R

example:	Logn (2,8) = 3


Exp

description:	exponential of the argument

syntax:	Exp ( x )

domain:	Exp : R -> R

example:	Exp (3) = 20.09

notes:	raises E (2.72...) in the power of x


ln
Ln / Log

description:	natural logorithm of the argument

syntax:	Ln ( x )

domain:	Ln : R+ -> R

example:	Ln (E) = 1


Ceil

description:	calculates the ceiling of the argument

syntax:	Ceil ( x )

domain:	Ceil : R -> R

example:	Ceil (2.1) = 3

Ceil (-2.1) = -2


Floor

description:	calculates the floor of the argument

syntax:	Floor ( x )

domain:	Floor : R -> R

example:	Floor (2.1) = 2

Floor ( -2.1) = -3


Sqrt

description:	square root of an argument

syntax:	Sqrt ( x )

domain:	Sqrt : R \ {R-} -> R \ {R-}

example:	Sqrt (4) = 2


Sqr

description:	raises the argument to it's second power

syntax:	Sqr ( x )

domain:	Sqr : R -> R

example:	Sqr (2) = 4


Random

description:	returns a random number <= to the argument

syntax:	Random ( x )

domain:	Random : R+ -> R \ {R-}

example:	Random ( 8 ) = 4


Sin

description:	sine of the argument

syntax:	Sin ( x )

notes:	check the calculator mode before you perform any trignonometric calculation

90° = pi / 2 = 100 grad


Cos

description:	cosine of the argument

syntax:	Cos ( x )

notes:	check the calculator mode before you perform any trignonometric calculation

90° = pi / 2 = 100 grad


Tan

description:	tangent of the argument

syntax:	Tan ( x )

notes:	check the calculator mode before you perform any trignonometric calculation

90° = pi / 2 = 100 grad


Cot

description:	cotangent of the argument

syntax:	Cotan ( x )

notes:	check the calculator mode before you perform any trignonometric calculation

90° = pi / 2 = 100 grad


Sinh

description:	hyperbolic sine of the argument

syntax:	Sinh ( x )


Cosh

description:	hyperbolic cosine of the argument

syntax:	Cosh ( x )


Tanh

description:	hyperbolic tangent of the argument

syntax:	Tanh ( x )


coth
Cotanh

description:	hyperbolic cotangent of the argument

syntax:	Cotanh ( x )


Arcsin

description:	inverse sine of the argument

syntax:	Arcsinh ( x )

notes:	check the calculator mode before you perform any trignonometric calculation


Arccos

description:	inverse cosine of the argument

syntax:	Arccos ( x )

notes:	check the calculator mode before you perform any trignonometric calculation


Arctan

description:	inverse tangent of the argument

syntax:	Arctan ( x )

notes:	check the calculator mode before you perform any trignonometric calculation


Arccot

description:	inverse cotangent of the argument

syntax:	Arccot ( x )

notes:	check the calculator mode before you perform any trignonometric calculation


Arcsinh

description:	inverse hyperbolic sine of the argument

syntax:	Arcsinh ( x )


Arccosh

description:	inverse hyperbolic cosine of the argument

syntax:	Arccosh ( x )


Arctanh

description:	inverse hyperbolic tangent of the argument

syntax:	Arctanh ( x )


Arccoth

description:	inverse hyperbolic cotangent of the argument

syntax:	Arccoth ( x )


Sec

description:	secant of the argument

syntax:	Sec ( x )

notes:	Sec ( x ) = 1/ Cos ( x )


Csc

description:	cosecant of the argument

syntax:	Csc ( x )

notes:	Csc ( x ) = 1/Sin ( x )


Sech

description:	hyperbolic secant of the argument

syntax:	Sech ( x )

notes:	Sech ( x ) = 1/ Cosh ( x )


Csch

description:	hyperbolic cosecant of the argument

syntax:	Csch ( x )

notes:	Csch ( x ) = 1/ Sinh ( x )


Arcsec

description:	inverse secant of the argument

syntax:	Arcsec ( x )

notes:	Arcsec ( x ) = Arccos (1/ x)


Arccsc

description:	inverse cosecant of the argument

syntax:	Arccsc ( x )

notes:	Arccsc ( x ) = Arcsin (1/ x)


Arcsech

description:	inverse hyperbolic secant of the argument

syntax:	Arcsech ( x )

notes:	Arcsech ( x ) = Arccosh (1/ x)


Arccsch

description:	inverse hyperbolic cosecant of the argument

syntax:	Arccsch ( x )

notes:	Arccsch ( x ) = Arcsinh (1/ x)


Prime

description:	latest prime number <= argument

syntax:	Prime ( x )

domain:	Prime : R -> N

example:	Prime (86) = 83

notes:	The routine of prime numbers calculation constructs a primes table while calculating higer prime numbers. It thus uses a powerful method to provide and immediate result if the prime number has already been calculated.

Use primec to get the number of primes inferiour to a value.

Use primen to get the nth prime.


e

description:	raises a number into a 10 power

syntax:	x e y

domain:	e : R -> R

example:	3e4 = 30000


constants
E, Pi, G, Catalan

E = 2.71... ln(E)=1 - Euler's number: 1+1+1/2!+1/3!+1/4!+...

Pi = 3.14... - perimeter of half of the unit circle

Catalan = sum((-1)^i/(2*i+1)^2,i=0..infinity) - Catalan's constant , approximately 0.915965594...

G = limit(sum(1/i,i=1..n) - ln(n), n=infinity) - Euler's Gamma Constant, approximately 0.5772156649..., used in trigonometric integrals


Mersienne

description:	finds the closest mersienne number inferior to the parameter (and < 2^32)

syntax:	Mersienne ( x )

domain:	Mersienne : [3,2^32] -> (3,7,31,127,8191,131071,524287,2147483647)

example:	Mersienne (145) = 127

notes:	when 2^n-1 is prime it is said to be a Mersenne prime.

M(p) = 2^p-1

P(p) = 2^(p-1)(2^p-1) is by the way a perfect number!

(taken from http://www.utm.edu/research/primes, a much bigger table of Mersienne, Prime and perfect numbers can be found there...)


MersienneGen

description:	finds the closest mersienne generator inferior to the parameter (and < 32)

syntax:	MersienneGen ( x )

domain:	Mersienne : [2,32] -> (2,3,5,7,13,17,19,31)

example:	MersienneGen (8) = 7


MersGen

description:	finds the mersienne number for a mersienne generator

syntax:	MersGen ( x )

domain:	x must be a mersienne generator


GenMers

description:	finds the mersienne generator for a mersienne number

syntax:	GenMers ( x )

domain:	x must be a mersienne number


Perfect

description:	finds the closest inferior perfect number to the parameter

syntax:	Perfect ( x )

domain:	Perfect : R+ -> ()

example:	Perfect (1231) = 496

notes:	a positive integer n is called a perfect number if it is equal to the sum of all of its positive divisors, excluding n itself.

6, 6=3*2*1=3+2+1

28, 28=14*7*4*2*1=14+7+4+2+1

there is a direct relation to the mersienne primes M(n) := (2^n-1):

- k is an even perfect number if and only if it has the form 2^(n-1)*(2^n-1).

- if 2^n-1 is prime, then so is n.

Finally, it is not known whether or not there is an odd perfect number, but if there is one it is big!

(taken from http://www.utm.edu/research/primes)


What's new?
What's new

What's new?

 version 2.0 of the Expression Calculator has been rewritten using a powerful native multithread support of 32 bit systems such as Windows NT and ... well, still a _multithread_ support ... Windows 95.

the version 2.01 has a faster prime generation algorithm, speeding up 2.5 time approx the previous versions' calculations and eating 3 times less memory

the version 2.3 has the Gauss functions integration capability that allows an impressive list of predefined integrals

(version 2.02)

- the following functions will now accept up to 255 parameters: max, min, gcd, lcm

- max, - min, - gcd, - lcm, - gamma & - logn will now work correctly as their _positive_ versions

- added average function

(version 2.03/2.04/2.05/2.06)

- faster calculation interrupt routine using native Win NT / 95 thread support instead of pseudo single task interrupt requests (you may now interrupt more than one calculation thread at the same time...you'll really see the difference in the Expression Calculator response with a slow machine)

- added suspend and resume threads routine (right button pops up the menu on the result grid)

- added command line parameters for startup (small, medium)

- added system information at the initialization and to the about box, providing processor(s), operating system, computer name and memory information

- added the help speed button

- added sleep delay at mutithread primes generator at second instance, speeds up main primes generator thread dramatically as prime threads are added

(version 2.1)

- corrected a severe bug in the prime generator

- corrected a bug in functions accepting more than 2 parameters, up to as many arguments as wanted can be specified for average, max, min , gcd & lcm.

- added primeC, primeN

- added Euler's beta function

- added Binomial function

(version 2.11/2.12)

- added three functions (accessible from the menu of the calculation results grid by pressing the right mouse button), (special section for first two):

- clear the primes' table, which resets all primes calculations that have been performed and frees all used memory

- copy the calculated primes to clipboard, copies the calculated primes to clipboard and delimits them by commas; this function is pretty slow and is a task that you cannot yet cancel

- reset the expression calculator

- corrected the pushbutton bug with the Arc and the Not buttons which could not be both down at the same time

- primes are cleared when the AC button is pressed or the Reset item in the grid menu chosen

- the result grid returns truncated values (with non-truncated values if different)

- the Expression Calculator will start in the last used mode (scientific / small / medium). Registry is used to store this information and it is user private.

(version 2.2)

- Expression Calculator can now be resized freely, buttons and panels follow during resizing, shape is kept at every restart. Registry is used to store this information and it is user private.

- The Expression Calculator will be set to the position and form of a previous session unless "small", "medium" or "scientific" parameter specified

(version 2.21)

- corrected last line highlight (when the last line in the grid is selected, the text copied to the entry box is also hightlighted)

- last operation selection has changed, it will scroll through the calculations performed (DOSKEY style) instead of simply copying the last operation a thousand times

- standard Windows copy (Ctrl-C), cut (Ctrl-X & Shift-Del) and paste (Ctrl-V & Shift Ins) functions do work in the edit box

- untruncated possible results are bigger (up to ~2^120 is shown in normal more instead of the X*10^style)

- when you press the first column (column with line numbers) on the grid, the result (not the expression) is copied to the clipboard

- you can now minimize the Expression Calculator

(version 2.22/2.23/2.24/2.25)

- corrected a dramatic lack of precision in the gamma, beta and factor functions for values over 70, the possible factorial, gamma and beta limits have been taken down to 1508!, but the results are precise for all of the values

- corrected value output for the X*10^ style for huge numbers

- you may start a fractional number with a point directly, 0.14322 may be written .14322

- corrected precision for very small negative values (47886.5-3323.4-6136.6-5547.6-14783.3-6958.8-1038.4-10098.4 did not give exactly 0)

- corrected precise result for negative values

- the initialization screen and some other bitmaps are full 256 color when using 256 color screen mode

- hexadecimal and octal modes work for negative numbers

- new parameter added to the Expression Calculator launch: "notitle" will not show the initialization bitmap when loading the Expression Calculator

- corrected the eInd (Phi) function, it will not affect the prime function any longer and will work correctly

- Expression Calculator will never start out of screen bounds any longer

- Init screen moved to front as the Expression Calculator initializes

(version 2.26/2.27)

- added code to avoid multithread concurrence bug under Windows NT 4.0, which caused the creation of unsuspendable and uninterruptable tasks during processor overload

- clicking on a pushed hex, bin, oct or rad button will reset the deg mode

- fixed resize problems, when the calculator is resized to the edge of the screen this has no effect on the opposite corner of the calculator

(version 2.3)

- the Expression Calculator has become really impressive, it is going shareware, please register!

- corrected Euler's indice: returns correct value for eInd(1) = 1

- removed new function for integral evaluation

- int function changed to intg because of the equivalent integral name

- linked the log function to ln for similarity with Maple and Mathematica, the new ten based logarithm is logten

- default mode is Radians for compatibility for default trigonometric function in Maple and Mathematica

- added trapezoid, simpson, newton, boole, ordersix, weddle integration approximation methods

- added Gauss integration method using Ernst Hairer's three level quadrature method

- added sum, mul

- added euler's constant

- added harmonic function

- added sigma(n,p), tau(n) : the sum of the positive divisors of n in power p.

- added dilog(x), dilogarithm

- added Si - The Sine Integral

- added Ci - The Cosine Integral

- added Ssi - The Shifted Sine Integral

- added Shi - The Hyperbolic Sine Integral

- added Chi - The Hyperbolic Cosine Integral

- added Erf - The Error Function

- added Erfc - The Complementary Error Function and its Iterated Integrals

- added FresnelC - The Fresnel Cosine Integral

- added FresnelS - The Fresnel Sine Integral

- added Fresnelf, Fresnelg - The Fresnel Auxiliary Functions

- added EllipticE - Incomplete and complete elliptic integrals of the second kind

- added EllipticCE - Complementary complete elliptic integral of the second kind

- added EllipticF - Incomplete elliptic integral of the first kind

- added EllipticK - Complete elliptic integral of the first kind

- added EllipticCK - Complementary complete elliptic integral of the first kind

- added general Pochhammer function

- added Catalan's constant

- added Copy menu functions

- grouped tasks menu functions

- added Load and Save calculation grid + variables (full state save) functions

- error message '")" expected' has been replaced by function: too many parameters when this is the case

- beta function third step parameter is now optional

- added Fermat function that returns the first four fermat numbers

- added assignment function

(next version - What's Cooking?)

- user defined functions

- non-continuous integrals with Epsilon and Aitken Delta algorithm

- (maybe) polynomial convergence

- functions plotter


Average

description:	finds the average number between up to as many arguments as wanted

syntax:	Average (x,...,y)

domain:	Average: R -> R

example:	Average(1,2) = 1.5


Beta

description:	computes Euler's Beta function

syntax:	Beta(a,b[,dt])

a:	lower bound

b:	upper bound

dt: 	optional step, default is 0.01

notes: 	check the gamma function for more details:

The Beta function is a direct definition from the calculation of the product of two Gamma functions which is itself a double integral, note that for negative values the integral has no sense and Beta of negative values is a pure definition from the Gamma function.


PrimeC

description:	returns the number of primes inferiour to it's argument

syntax:	Primec(x)

domain:	R\{R-}  -> N

notes:	1 is considered as a prime and the argument itself is included in the count if it is a prime number. Check the prime.  primen and phi functions.Check the prime and the primen functions.


PrimeN

description:	returns the nth prime

syntax:	PrimeN(n)

domain:	N  -> N

notes:	1 is considered as a prime, so primen(1) will return 1 and not 2! Check the prime.  primec and phi functions.


binomial
Binom

description:	binomial coefficients

syntax:	Binom(n,j)

domain:	R -> R (with restrictions of Gamma function)

notes:	Binom(n,j):=n! / ( j! (n-j)! )


License Agreement

1. Distribution

This shareware software may be freely distributed, provided that such distribution includes only the original archive supplied by Stolen Technologies Inc. (newly EdelWeiss).  You may not alter, delete or add any files in the distribution archive.

2. License

By receiving and/or using S.T.I. software, you accept the following Evaluation and Registered User Agreement.  This agreement is a binding legal agreement between S.T.I. and the purchasers, users or evaluators of  S.T.I. software and products.  If you do not intend to honor this agreement, remove all installed  S.T.I. software from your computer now.

3. Evaluation (Unregistered) and Registered User Agreement

You may evaluate the Shareware program for maximum of fifteen calendar days, after which you must register the program with S.T.I. or remove the software from your computer.

You may allow other users to evaluate copies of the unregistered Shareware. All evaluation users are subject to the terms of this agreement.

The evaluator/user/buyer/owner is not allowed to attempt to reverse engineer, disassemble or decompile S.T.I.  software and products.

The evaluator/user/buyer/owner of S.T.I. software will indemnify, hold harmless, and defend S.T.I. against lawsuits, claims, costs associated with defense or accusations that result from the use of S.T.I. software.

S.T.I. is not responsible for any damages whatsoever, including loss of information, interruption of business, personal injury and/or any damage or consequential damage without limitation, incurred before, during or after the use of our products.  Our entire liability, without exception, is limited to the customers' reimbursement of the purchase price of the software (maximum being the suggested retail price as listed by S.T.I.) in exchange for the return of the product, all copies, registration papers and manuals, and all materials that constitute a transfer of ownership from the customer back to S.T.I..

Each registered copy of the S.T.I. software may be used in only one single location by one user.  Use of the software means that you have loaded the program and run it or have installed the program onto a computer.  If you install the software onto a multi-user platform or network, each and every individual user of the software must be registered separately.

Registration does apply to a single person or a single company only. It may not be transferred to a different name, unless the company name has changed.


how to register
Register!

How can you register?

S.T.I. uses Kagi services for software registration which is very convenient for both the group and the registering users. The price for a single user licence for the Expression Calculator is 25.- US$. Simply launch the Register program from the main menu of the Expression Calculator - Register command and follow instructions on the screen. Kagi accepts cash, checks, money orders, VISA, MasterCard, American Express and First Virtual Payements. It can also issue invoices. Detailed help is available from the registration program.

You may register electronically via the internet, without sending e-mail. Check the register link at http://www.infomaniak.ch/~dblock or one of the mirrors.

Why should you register?

If you live in Switzerland or prefer to make a direct bank transfer, send a check or the cash amount to the author, please send it to:

Daniel Doubrovkine

11, chemin de la Clairière,

1207 Geneva, Switzerland

tel & fax: 41 (0) 22 735 69 47

e-mail: dblock@infomaniak.ch

account No. with the Swiss Bank Corporation: C2-112.610

note: Register for Windows program is (c) Grzegorz (Greg) Kochaniak


register
Register!

Register Now!

What is registration and why should you register?

For a year, Expression Calculator was freeware. This means you could use Expression Calculator without any considerations, it was just given away. As  the Expression Calculator has become a huge program and one of the best on the market today, taking a lot of time and work, Expression Calculator  has become Shareware. This is a general new policy for Expression Calculator  and is valable for ALL versions of the Expression Calculator , so using an older version of  the Expression Calculator does not give you the right to use it for free.

Shareware means that we have made the software available to you for free evaluation.  You are entitled to evaluate the software for up to 15 days without obligation to pay.  After 15 days, if you decide to keep the software, you must register your copy with us for a small fee of 25.- US$ for a single licence. Check this page for payement details.

There's no difference between the registered and a not registered version of the Expression Calculator (actually there's no such registered version of the Expression Calculator (yet)). Stolen Technologies Inc. (newly EdelWeiss) policy is very different from the greedy companies who think that the short term benefits are the aim to achieve. We are a group of University of Geneva and Lausanne's Institute of Technology students that write top quality software and also bring all users top quality free or shareware products. We have learned a lot writing programms for you, we trust you and feel that you, the end-user must first get responsible with the shareware pricipe, so don't hesitate to show us that you like what we are doing for you and encourage us to continue. You can do this by simply registering the Expression Calculator! The price you pay is infinitely small in comparison of the support you bring to those who feel that a small enthousiast group can accomplish great things.

The announcements list for the Expression Calculator  is open to ALL users, regardless that they have or have not registered. Neithertheless, there will be cheaper updates, special prices and particular conditions for the Expression Calculator and other Stolen Technologies Inc. software, including commercial programms that will be released in the future for users who have registered earlier.

The Expression Calculator has received a great response from the users on the Internet and S.T.I. is very happy with the support it has encoutered! We are open to all suggestions, comments and critics. We thank you for your attention, and don't forget to register!

How can you register?

Daniel Doubrovkine

(the Expression Calculator author)


Frequently Asked Questions

- Why does anybody need a multithread calculator?

Hmmm... i am not answering political questions. (Yep, the answer is as stupid as the question).

- Does multithreading make the calculation more precise?

No it doesn't. (and check question 1).

- Is the source available?

Yes it is. The source of the multithread calculation object written in object pascal (Delphi 2.0) is available on the Expression Calculator's home page at http://www.infomaniak.ch/~dblock/express.htm. This source may be used freely for non lucrative purposes. For using it in shareware or small commercial software, please register with US$ 50.-

For using it in large software projects, please contact the author. The price of the complete Expression Calculator source is US$ 100.- and is available on demand. Of course you may download the source for free, but besides the appeal of your conscience, you should remember that Big Brother's watching you:)

- Are you trying to concurrence Maple? (a Maple team question ... just kidding:)

- No. The major difference between a calculator and a mathematical system is that the later is capable of polynomial simplifications and various kinds of operations that allow to find exact results of the expressions. All the operations are performed symbolically and evaluated on demand. The Expression Calcualtor is designed to provide a numerical approach to common and uncommon functions, including complicated ones in the domain of possible. So don't try to evaluate integrals on functions like y=0 when rational and y=1 when not.

- Where can I learn stuff like Gaussian integrals or multithread programming?

- At the university of Geneva. Lot's of material is available on the internet at http://www.unige.ch, math section. For programming...well, you don't learn such things, and who said that computer science is an exact matter?


multithread support
Multithread Support (for curious individuals)

What is an object?

An object type is a data structure that contains a fixed number of components. Each component is either a field (which contains data of a particular type), a method, which performs an operation on the object; or a property. An object type can inherit components from another object type. The inheriting object is a descendant and the object inherited from is an ancestor. More than one instance of an object is possible, thus each time a calculation was performed with the Expressions Calculator 1.x, a new calculation object was created, the calculation executed inside the object and the result output by the object itself as the job was finished. The object is then cleared by the EXEcute routine that has created it.

There's a Microsoft Win32S definition of the object, which is a unit of information that resides in a compound document and whose behavior is constant no matter where it is located or used. Another one from the C++ reference manual: an object is a region of storage.

What is a class?

A class is a user defined type. A class contains objects, thus a class is a more complete object. A class contains functions for it's initialization, manipulation and clean-up.

What is a thread?

A thread is a very particular class. It is a separate task under a multitasking environment that supports it (Windows NT for example). Native multithreading consist of giving an adequate time to every thread running depending on the thread's priority. Unlike under Windows 3.x which gave the hand to an application and waited until the later gave it back, Windows NT, OS/2, Unix systems, and in some way Windows 95, destribute this time and take back the hand whenever the operating system wants it. The Expression Calculator takes complete advantage of this technique! This allows an  optimal use of the CPU.

Okay, what about the Expression Calculator?

Without the threads the Expression Calculator was always waiting for the object to finish the calculation. By executing another operation, before the previous one finished, the Expression Calculator was reentering the same execution routine again, thus dramatically slowing the calculations running and eating lot's of memory for nothing. Thus it was practically impossible to cancel an operation on the bottom of this execution (the first run), since it was running at probably 5% of it's normal speed and came back to it's normal state only after all the tasks on top were finished.

Multithreading solves the problem completely. Every time the user asks for a new calculation to be done, the Expression Calculator creates a new calculation thread instance giving it the necessary parameters such as the input string and the calculation mode, as well as the target for the output result. The execution routine which generated the thread terminates before the thread has actually even started to work. The thread exists separately and is protected by the operating system. It performs the calculation at it's maximum speed affecting very little the GUI performance, but using the CPU at 100%. The thread itself will output the result as it is finished and will destroy itself after all jobs have been done. Threads communicate with the Expression Calculator through private pipes, without affecting the performance in any way. You must still know that every thread initialized slows down all the others already running. Each thread will receive a similar portion of time from the CPU. There's one exception, while generating prime numbers with requests from more than one thread, there is only the working thread that is taking CPU time, those waiting for the result to complete loop eating very little CPU time by "sleeping" a certain ammount of CPU cycles, giving maximum time possible to the working task. Virtually an infinite number of threads can be created and any of the threads very easilly cancelled.

What part of the Expression Calculator is a true thread?

Every window (form) under Windows NT/95 is a thread. The calculation thread generator (when you press the EXE button) is a thread itself, so you never wait for it to finish. The calculation routine is a fully independent 32 bit thread.

And finally. what is really the speed difference?

8 times faster for prime numbers calculation with the same algorithm for example... Any arguments against multithreading?


mul & sum
Mul, Sum

description:	product and summation of a series of numbers

syntax:	Mul(x,...,y), Sum(x,...,y)


Harmonic

description:	harmonic function

harmonic(n) = sum( 1/i, i=1..n ) = Psi(n+1) + gamma

syntax:	Binom(n,j)

examples:	harmonic(1)=1

harmonic(2)=1.500000000


Pochhammer

description:	general pochhammer function

pochhammer(x,n) = x*(x+1)*...*(x+n-1)

syntax:	pochhammer(x, n)

examples:	pochhammer(5,3)=210


Sigma, Tau

description:	sum of divisors

tau(n) - the sum of the positive divisors of n

sigma(n,k) - the sum of the k-th power of positive divisors of n

syntax:	tau(n)

sigma(n,k)

examples:	tau(9)=13

tau(100)=217

sigma(100,0)=9


Integral Approximations (student)

description:	approximate a function's integral using quadrature functions

trapezoid (order 2 - level 2)

simpson (order 4 - level 3)

newton (order 4 - level 4)

boole (order 6 - level 5)

ordersix (order 6 - level 6)

weddle (order 8 - level 7)

syntax:	method(function,variable,a,b[,step])

function: 	any valid function

variable: 	any valid variable

a: 	lower bound

b: 	upper bound

step: 	optional interval division, default is 2048

examples:	Simpson:	simpson(log(x^3),x,1,10,64) = 42.0775519815819 (5 decimals correct)

Weddle:	weddle(log(x^3),x,1,10,64) = 42.0775527898212 (12 decimals correct)

Gauss:	int(log(x^3),x,1,10) = 42.0775527898214 (all decimal correct)

I am not concurrencing Maple's heavy symbolic analysis:)

Maple:	evalf(int(log(x^3),x=1..10)) = 42.0775527898214

theory:	The idea is to approximate the integral of a continuous or a discontinueous function with reasonable limits at the discontinueous points for a given interval [a,b]. The function trapezoid computes a numerical approximation to an integral using the Trapezoidal rule (order 2 quadrature formula of 2 levels). The quadrature functions are called Newton-Cotes formulas. Thus, in general, a quadrature formula is given by:

(where c -s are quadrature formula nodes and b -s are quadrature formula wights) and the quadrature formula is of order p if it is exact for all polynomials of degree p-1. Using this and a couple of other theorems that you may find in the Ernst Hairer's "Analyse Numérique" (available on the Internet at http://www.unige.ch)  weights are found for given nodes. A node is defined by dividing elementary intervals into s parts.

This simpson's approximation for the integral of a function f on an elementary interval [x,x+h] will be given by:  (h/6)*(f(x)+ 4*f(x+h/2)+f(x+h)). The Expression Calculator will use a default number of elementary intervals or 2048 if you don't specify an another value. It will divide the interval [a,b] into N elementary intervals and use a quadrature formula (here of Simpson) to approximate the integral.

Here is the table that the Expression Calculator uses for the said six quadrature formulas:

name	s 	p	weights

trapezoid	2	2	1/2	1/2

Simpson	3	4	1/6	4/6	1/6

Newton	4	4	1/8	3/8	3/8	1/8

Boole	5	6	7/90	32/90	12/90	32/90	7/90

OrderSix	6	6	19/288	75/288	50/288	50/288	75/288	19/288

Weddle	7	8	41/840	216/840	27/840	272/840	27/840	216/840	41/840

see: gaussian integral function


Integral Approximations (exact)

description:	approximate a function's integral using Gauss function

syntax:	int(function,variable,a,b[tol]) (you can use Gauss instead of int)

function:	any valid function

variable:	any valid variable

a:	lower bound

b:	upper bound

tol:	optional integral tolerance (<1), default is 10^(-20)

examples:	int(x^2,x,1,2) = 2.333... and this is perfectly correct!

one interesting use of Gauss results are for functions with discontineous bounds, since it does not calculate the functions at the bounds, for example the famous (-) gamma integral

int(log(log(1/x)),x,0,1) = -0.577215664901533 (Expression Calculator, and this is quite an exact result)

evalf(int(log(log(1/x)),x=0..1)) =  -0.5772156649 (Maple)

as you may see this function is not defined in x=1 and has virtually no convergent values that could be used in points -> x=1, this is where Gauss helps

theory:

Gauss integrals approximations are the best before the symbolic analysis of software like Maple and Mathematica, which use very advanced symbolic techniques to represent the integrals and then evaluate expressions to provide an exact integral value or a very high precision. The Expression Calculator is no rival to this software.  It does Integral approximations with Gauss quadrature method combined with a rather recent (1980s) technique developped at the University of Geneva. The value of integrals is an approximation, as good as it may be.

Expression Calculator uses the Tegral embedded quadrature formulas method. The major idea is to approximate the functions' integrals with an order 30 quadrature formula, which is calculated using Legenre's orthogonal polynomials. Two embedded quadrature formulas are extracted from the order 30 one, order 14 and order 6. All formulas are symmetric. The integral for the elementary interval is calculated from the order 30 quadrature formula, the maximum errors committed during the calculation using the second two. Like this, and this is different from other Gauss integration methods, the program knows exactly the maximum error it makes and can check the tolerance.

Gauss is calculated for an interval [a,b] without using the bounds. If the error commited is satisfactory with the given tolerance, the integral's value is kept as final, else the interval is divided into two equal parts, Gauss is calculated again. In case the sum of abs(errors) does not match the tolerance, Tegral will look for the interval that has the worst error and divide it into two parts. So on till a tolerated value has been found.


dilogarithm
Dilog

description:	dilogarithm integral function

dilog(x) =  int(ln(t)/(1-t),t,1,x);

syntax:	dilog(x)

examples:	dilog(100) = -12.1924216690332 (which is the exact result)


Erf, Erfc

description:	erf - The Error Function

erfc - The Complementary Error Function and its Iterated Integrals

syntax:	erf(x) = 2/sqrt(Pi) * int((exp(-t^2), t,0,x);

erfc(x) = 1- erf(x) = 1 - 2/Pi^(1/2) * int((exp(-t^2), t,0,x);

erfc(x,n) : not calculated with the Expression Calculator (infinite bound integral)

examples:	erf(3) = 0.999977909503001 (which is the exact result)


SI, Ci, Ssi, Shi, Chi

description:	trigonometric integrals

Si - The Sine Integral

Ci - The Cosine Integral

Ssi - The Shifted Sine Integral

Shi - The Hyperbolic Sine Integral

Chi - The Hyperbolic Cosine Integral

syntax:	Si(x)   = int(sin(t)/t, t=0..x)

Ci(x)   = gamma + ln(x) + int((cos(t)-1)/t, t=0..x)

Ssi(x)  = Si(x) - Pi/2

Shi(x)  = int(sinh(t)/t, t=0..x)

Chi(x)  = gamma + ln(x) + int((cosh(t)-1)/t, t=0..x)

examples:	Ci(1) = 0.337403922900968 (which is the exact result)

note:	integration will take some time for huge numbers because of the nature of trigonometric integrals

plot of the Ci(x) function:


Fresnel Integrals

description:	FresnelC - The Fresnel Cosine Integral

FresnelS - The Fresnel Sine Integral

Fresnelf, Fresnelg - The Fresnel Auxiliary Functions

syntax:	FresnelC(x) =  int(cos(Pi/2*t^2), t=0..x);

FresnelS(x) =  int(sin(Pi/2*t^2), t=0..x);

Fresnelf(x) = (1/2 - FresnelS(x))*cos(Pi/2*x^2) - (1/2 - FresnelC(x))*sin(Pi/2*x^2)

Fresnelg(x) = (1/2 - FresnelC(x))*cos(Pi/2*x^2) - (1/2 - FresnelS(x))*sin(Pi/2*x^2)

examples:	FresnelC(1) = 0.779893400374992 (which is the exact value)

note:	integration will take some time for huge numbers because of the nature of fresnel integrals


Elliptic Integrals

description:	EllipticE - Incomplete and complete elliptic integrals of the second kind

EllipticCE - Complementary complete elliptic integral of the second kind

EllipticF - Incomplete elliptic integral of the first kind

EllipticK - Complete elliptic integral of the first kind

EllipticCK - Complementary complete elliptic integral of the first kind

syntax:	EllipticE(k, z) = int(sqrt(1-k^2*t^2)/sqrt(1-t^2),t=0..z)

EllipticE(k) = EllipticE(1,k)

EllipticCE(k) = EllipticE(1,sqrt(1-k^2))

EllipticF(k,z) = int(1/sqrt(1-t^2)/sqrt(1-k^2*t^2),t=0..z)

EllipticK(k) = EllipticF(1,k)

EllipticCK(k) = EllipticF(1,sqrt(1-k^2))

examples:	EllipticF(0.3,0.2) = 0.201479590139123 (which is the exact value)

notes:	precision for elliptic integrals is set to 10^-7

integration will take some time for huge numbers because of the nature of elliptic functions


Fermat

description:	returns the nth Fermat number

syntax:	the nth Fermat number is 2^(2^n)+1.

returns the nth Fermat number for n<4

example:	Fermat(3) = 65537.00


assignment
=

description:	assigns a number to a variable

syntax:	x = Expression

example:	you can use this function inside an expression:

Int(x^2/5,x,a=0,b=5)

-> 8.33333333333333e+0000

a

-> 0

b

-> 5